package us.sunrisemorning.douyuchat;

import org.tio.core.intf.Packet;

public class MessagePacket extends Packet {
	private static final long serialVersionUID = 2695650470094130256L;
	public static final int LENGTH_LENGTH = 4;
	public static final int HEADER_LENGTH = 8;
	public static final String BODY_CHARSET = "utf-8";
	public static final short TYPE_CLIENT = 689;
	public static final short TYPE_SERVER = 690;
	
	private int length;
	private short type;
	private byte encryptType = 0;
	private byte reserved = 0;
	private byte[] body;

	public int getLength() {
		return length;
	}

	public void setLength(int length) {
		this.length = length;
	}

	public short getType() {
		return type;
	}

	public void setType(short type) {
		this.type = type;
	}

	public byte getEncryptType() {
		return encryptType;
	}

	public void setEncryptType(byte encryptType) {
		this.encryptType = encryptType;
	}

	public byte getReserved() {
		return reserved;
	}

	public void setReserved(byte reserved) {
		this.reserved = reserved;
	}

	public byte[] getBody() {
		return body;
	}

	public void setBody(byte[] body) {
		this.body = body;
	}
}
